﻿<UserControl x:Class="Export.Ui.Pages.Admin.UserDetails"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="500" >
    <Grid Style="{StaticResource ContentRoot}"   >
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="31*"/>
            <RowDefinition Height="225*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto" MinWidth="84"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Label Content="UserName" HorizontalAlignment="Left" Margin="4,4,0,0" VerticalAlignment="Top" Height="16" />
        <TextBox  Grid.Column="1" Height="23" Margin="4,4,10,0" TextWrapping="Wrap" Text="{Binding UserName }" VerticalAlignment="Top"/>
        <TextBox Grid.Column="1" Height="23" Margin="4,5,10,0" Grid.Row="1" TextWrapping="Wrap" Text="{Binding Password }" VerticalAlignment="Top" Grid.RowSpan="2"/>
        <Label Content="Password" HorizontalAlignment="Left" Margin="4,5,0,0" Grid.Row="1" VerticalAlignment="Top" Height="16"/>
        <Label Content="Email" HorizontalAlignment="Left" Margin="4,6,0,0" Grid.Row="2" VerticalAlignment="Top" Height="16" />
        <Label Content="Name" HorizontalAlignment="Left" Margin="4,7,0,0" Grid.Row="3" VerticalAlignment="Top" Height="16" />
        <Label Content="Role" HorizontalAlignment="Left" Margin="4,8,0,0" Grid.Row="4" VerticalAlignment="Top" Height="16" />
        <Label Content="Phone No." HorizontalAlignment="Left" Margin="4,9,0,0" Grid.Row="5" VerticalAlignment="Top" Height="16" />
        <Label Content="Fax No." HorizontalAlignment="Left" Margin="4,10,0,0" Grid.Row="6" VerticalAlignment="Top" Height="14" />
        <Label Content="Pin code" HorizontalAlignment="Left" Margin="4,11,0,0" Grid.Row="7" VerticalAlignment="Top" Height="16" />
        <Label Content="Active" HorizontalAlignment="Left" Margin="4,8,0,0" Grid.Row="9" VerticalAlignment="Top" Height="16" />
        <TextBox Grid.Column="1" Height="23" Margin="4,6,10,0" Grid.Row="2" TextWrapping="Wrap" Text="{Binding Email }"  VerticalAlignment="Top" Grid.RowSpan="2"/>
        <TextBox Grid.Column="1" Height="23" Margin="4,7,10,0" Grid.Row="3" TextWrapping="Wrap" Text="{Binding Name }" VerticalAlignment="Top" Grid.RowSpan="2"/>
        <ComboBox Grid.Column="1" Margin="4,8,10,0" Grid.Row="4" VerticalAlignment="Top" Height="22" Grid.RowSpan="2" ItemsSource="{Binding Roles}" DisplayMemberPath="Name" SelectedValuePath="Id" SelectedValue="{Binding RoleId}" />
        <TextBox Grid.Column="1" Height="23" Margin="4,9,10,0" Grid.Row="5" TextWrapping="Wrap" Text="{Binding Telephone }" VerticalAlignment="Top" Grid.RowSpan="2"/>
        <TextBox Grid.Column="1" Height="23" Margin="4,10,10,0" Grid.Row="6" TextWrapping="Wrap"  Text="{Binding Fax }" VerticalAlignment="Top" Grid.RowSpan="2"/>
        <TextBox Grid.Column="1" Height="23" Margin="4,11,10,0" Grid.Row="7" TextWrapping="Wrap" Text="{Binding PinCode }" VerticalAlignment="Top" Grid.RowSpan="2"/>
        <CheckBox Content="" Grid.Column="1" HorizontalAlignment="Left" Margin="4,8,0,0" Grid.Row="9" VerticalAlignment="Top" Height="17" Width="71" IsChecked="{Binding Active}" />
        <Button Content="Save" Grid.Column="1" HorizontalAlignment="Left" Margin="233,10,0,0" Grid.Row="10" VerticalAlignment="Top" Width="75" Command="{Binding SaveCommand}" Height="26"/>
        <Button Content="Close" Grid.Column="1" HorizontalAlignment="Left" Margin="313,10,-4,0" Grid.Row="10" VerticalAlignment="Top" Width="75" Command="{Binding CloseCommand}" Height="26"/>

    </Grid>
</UserControl>
